CREATE EXTERNAL TABLE jms_dm.dm_waybill_customer_complaint_agg_mt
(
    regional_code              string COMMENT '大区编码',
    regional_desc              string COMMENT '大区名称',
    proxy_name                 string COMMENT '代理区名称',
    proxy_code                 string COMMENT '代理区编码',
    proxy_cnt_month            string COMMENT '代理区月累计',
    proxy_total_month          bigint COMMENT '月累计客诉量-全网',
    proxy_cnt_month_ratio      decimal(10, 2) COMMENT '月累计客诉率-代理区',
    proxy_total_month_ratio    decimal(10, 2) COMMENT '月累计客诉率-全网',
    network_cnt_month          bigint COMMENT '月累计网点客诉量-代理区',
    network_total_month        bigint COMMENT '月累计网点客诉量-全网',
    network_cnt_month_ratio    decimal(10, 2) COMMENT '月累计网点客诉率-代理区',
    network_total_month_ratio  decimal(10, 2) COMMENT '月累计网点客诉率-全网',
    third_platform_cnt_month   bigint COMMENT '月累计三方客诉量-代理区',
    third_platform_total_month bigint COMMENT '月累计三方客诉量-代理区',
    third_cnt_month_ratio      decimal(10, 2) COMMENT '月累计三方客诉率-代理区',
    third_total_month_ratio    decimal(10, 2) COMMENT '月累计三方客诉率-全网',
    transfer_cnt_month         bigint COMMENT '月累计转单客诉率-代理区',
    transfer_total_month       bigint COMMENT '月累计转单客诉率-全网',
    transfer_cnt_month_ratio   decimal(10, 2) COMMENT '月累计转单客诉率-代理区',
    transfer_total_month_ratio decimal(10, 2) COMMENT '月累计转单客诉率-全网',
    proxy_taking_cnt_month     bigint COMMENT '月累计收件量-代理区',
    proxy_arrival_cnt_month    bigint COMMENT '月累计到件量-代理区',
    proxy_work_cnt_month       bigint COMMENT '当月代理区的普通工单客诉量',
    proxy_project_cnt_month    bigint COMMENT '当月代理区的普通工单客诉量',
    proxy_claim_cnt_month      bigint COMMENT '当月代理区的理赔工单客诉量',
    proxy_appeal_cnt_month     bigint COMMENT '当月代理区的邮政工单客诉量',
    work_total_month           bigint COMMENT '普通工单客诉量-月累计',
    project_total_month        bigint COMMENT '普通工单客诉量-月累计',
    claim_total_month          bigint COMMENT '理赔工单客诉量-月累计',
    appeal_total_month         bigint COMMENT '邮政工单客诉量-月累计',
    proxy_taking_total_month   bigint COMMENT '月累计收件量-全网',
    proxy_arrival_total_month  bigint COMMENT '月累计到件量-全网',
    data_time                  string COMMENT '日期'
)
    COMMENT '客诉量月汇总报表-月'
    PARTITIONED BY (dt string COMMENT '分区字段')
stored as parquet
    LOCATION '/dw/hive/jms_dm.db/external/dm_waybill_customer_complaint_agg_mt'
;